#include "UDPserver.hpp"
#include <iostream>
#include <memory>


// ./udpserver ip port
int main(int argc,char* argv[])
{
    if(argc!=2)
    {
        std::cerr<<"Usage: "<<argv[0]<<"  port"<<std::endl;
        return 1;
    }
    //std::string ip=argv[1];
    uint16_t port=std::stoi(argv[1]);

    Enable_console_logstrategy();

    std::unique_ptr<udpserver> usvr=std::make_unique<udpserver>(port/*,ip*/);
    usvr->init();
    usvr->Start(); 
    return 0;
}
